package com.yonyong.tao.commons.api.receive;

import com.yonyong.tao.commons.api.receive.annotations.PhoneNumber;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @Describtion 自定义检验注解测试实体类
 * @Author yonyong
 * @Date 2020/3/10 10:39
 * @Version 1.0.0
 **/
@Data
@ToString
public class AutoParam {

    /**
     * 当前页数
     */
    @NotNull(message = "当前页数不能为空")
    @Min(value = 1,message = "页码必须大于0")
    private Integer page;

    /**
     * 每页显示记录的条数
     */
    @NotNull(message = "当前页显示条数不能为空")
    @Min(value = 1,message = "每页记录数必须大于0")
    private Integer rows;

    @PhoneNumber
    private String phone;

    @PhoneNumber(message = "phone2:111")
    private String phone2;
}
